home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 361 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: fido.asd.sgi.com!austern
  2. From: Dick Menninger <Dick.Menninger@daytonoh.attgis.com>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Throwing an exception from within a signal handler
  5. Date: 08 Feb 1996 14:45:40 PST
  6. Organization: AT&T Global Information Solutions
  7. Approved: austern@isolde.mti.sgi.com
  8. Message-ID: <DMH620.FKn@falcon.daytonoh.attgis.com>
  9. References: <4f2th6$4qh@galaxy.ucr.edu>
  10. Reply-To: mennid <Dick.Menninger@daytonoh.attgis.com>
  11. NNTP-Posting-Host: isolde.mti.sgi.com
  12. X-Original-Date: Thu, 8 Feb 1996 20:54:00 GMT
  13. X-Newsreader: DiscussIT 2.5.1.3 for MS Windows [AT&T Software Products Division]
  14. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  15.     iQBVAwUBMRp9L0y4NqrwXLNJAQFB6AIAzpVWtlf6ovMqVeRvoHb8igZXDpDTCTDd
  16.     5PFz9B7ZubFubEdUtAD2T27RDwD9RdQ8BY0LiShBt60/6NtH1GGe0Q==
  17.     =yGv+
  18. Originator: austern@isolde.mti.sgi.com
  19.  
  20. > ==========Tom Payne, 2/4/96==========
  21.  
  22. [...]
  23.  
  24. > Atomicity of such updates to atomic variables is not always a problem.
  25. > For instance, in most cases a signal handler can increment an atomic
  26. > counter (e.g. a timer) without difficulties, even though the
  27. > read/modify/write sequence is not atomic.  In the case of nonatomic
  28. > variables, atomicity must be enforced by blocking certain signals.
  29. > Such blockage could be portably implemented via atomic blockage flags,
  30. > which, in turn, are volatile atomic variables that must be read by
  31. > signal handers.
  32.  
  33. Although that could keep them from reading a bad value,
  34. they have no way to wait for it to become valid if they
  35. interrupted the owner. So, the updater thread would have
  36. to fully block the signals that really need the value in the
  37. handler for handling to proceed.  That is, the problems
  38. are more severe than between threads that do not interrupt
  39. each other (a signal handler is just a specialized thread,
  40. whether or not the environment's terminology calls it that
  41. is irrelevant).
  42.  
  43. Good Day
  44. Dick
  45. Dick.Menninger@DaytonOH.ATTGIS.COM
  46. ---
  47. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  48.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  49.   in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  50.